﻿using iemtm.WeChat.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace iemtm.WeChat.Application.GenCenter
{
    public interface IGeneratorAppService
    {
        /// <summary>
        /// 油机列表
        /// </summary>
        /// <param name="rows">最后一条数据id</param>
        /// <param name="order">排序</param>
        /// <param name="page">页数</param>
        /// <param name="limit">每页显示数量</param>
        /// <returns></returns>
        dynamic GetGenList(int rows, string order, int page, int limit);

        /// <summary>
        /// 删除机组
        /// </summary>
        /// <param name="GeneratorId"></param>
        /// <returns></returns>
        Task<ResultModel> DeleteGen(int GeneratorId);

        /// <summary>
        /// 通过发电机或者DTU查询相关记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ResultModel GetDtuIdByGenOrDtu(string id);



        /// <summary>
        /// 自检
        /// </summary>
        /// <param name="dtuId"></param>
        /// <returns></returns>
        /// 

        Task<dynamic> GetSelfCheckInfoByDtuId(string dtuId);

        #region 采集器 保养-与图片

        /// <summary>
        /// 获取油机维修列表数量
        /// </summary>
        /// <param name="times">全部0 一周7 半月15 本月30</param>
        /// <param name="paraStr">搜索</param>
        /// <returns></returns>

        dynamic GetGenMainCount(int times, string paraStr);


        /// <summary>
        /// 获取油机保养列表（分页）
        /// </summary>
        /// <param name="times">全部0 一周7 半月15 本月30</param>
        /// <param name="pagesize">每页多少数据，默认50</param>
        /// <param name="topNum">配合sql语句</param>
        /// <param name="menuIndex">页面tab选项 0：所有 1：待审核 2：审核通过 3：审核不通过</param>
        /// <param name="paraStr">查询条件</param>
        /// <returns></returns>
        dynamic GetGenMainListByPage(int times, int pagesize, int topNum, int menuIndex, string paraStr);


        /// <summary>
        /// 添加维修
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<string> AddGenMain(Maintenence model);

        #endregion

        #region 采集器维修-与图片

        /// <summary>
        /// 获取油机维修列表数量
        /// </summary>
        /// <param name="times">全部0 一周7 半月15 本月30</param>
        /// <param name="paraStr">搜索</param>
        /// <returns></returns>     
        dynamic GetMaintainCount(int times, string paraStr);


        /// <summary>
        /// 获取油机维修列表（分页）
        /// </summary>
        /// <param name="times">全部0 一周7 半月15 本月30</param>
        /// <param name="pagesize">每页多少数据，默认50</param>
        /// <param name="topNum">配合sql语句</param>
        /// <param name="menuIndex">页面tab选项 0：所有 1：待审核 2：审核通过 3：审核不通过</param>
        /// <param name="paraStr">查询条件</param>
        /// <returns></returns>

        dynamic GetMaintainListByPage(int times, int pagesize, int topNum, int menuIndex, string paraStr);

        /// <summary>
        /// 添加维修
        /// </summary>
        /// <param name="GensetNum"></param>
        /// <param name="DTUID"></param>
        /// <param name="RepairContent"></param>
        /// <param name="MaintPicture"></param>
        /// <returns></returns>
        Task<ResultModel> AddMaintain(string GensetNum, string DTUID, string RepairContent, string[] MaintPicture);

        #endregion

        #region 对机组添加支架--信息

        /// <summary>
        /// 获取油机支架列表数量（分页）方法
        /// </summary>
        /// <param name="times">全部0 一周7 半月15 本月30</param>
        /// <param name="pagesize">每页多少数据，默认50</param>
        /// <param name="topNum">配合sql语句</param>
        /// <param name="menuIndex">页面tab选项 0：全部 1：待审核 2：已审核 3：审核不通过</param>
        /// <param name="paraStr">查询条件</param>
        /// <returns></returns>

        dynamic GetBracketListByPage(int times = 0, int pagesize = 50, int topNum = 0, int menuIndex = 0, string paraStr = "");





        /// <summary>
        /// 获取审核统计数量
        /// </summary>
        /// <param name="times">时间</param>
        /// <param name="paraStr">查询条件</param>
        /// <returns></returns>

        dynamic GetGenBracketCount(int times = 0, string paraStr = "");


        /// <summary>
        /// 添加支架图片
        /// </summary>
        /// <param name="GensetNum">机组编号</param>
        /// <param name="DTUID">DTUID</param>
        /// <param name="remarkContent">备注</param>
        /// <param name="Picture">图片</param>
        /// <returns></returns>
        Task<ResultModel> AddBracket(string GensetNum, string DTUID, string remarkContent, string[] Picture);


        #endregion
    }
}
